package com.jxj.study.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

/**
 * 文件上传大小限制测试
 */
@Controller
@RequestMapping("/file")
public class UpFileSizeTestController {

    @RequestMapping(value = "/up",method = RequestMethod.POST)
    @ResponseBody
    public String upFile(MultipartFile file){
        System.out.println(file.getOriginalFilename());
        return "ok";
    }

    @RequestMapping(value = "/page")
    public String page(){
        return "UpFileSizeTest";
    }
}
